<?php

namespace App\Models\Content;

use App\Traits\ModelTrait;
use Illuminate\Database\Eloquent\Model;

class Menus extends Model
{
    use ModelTrait;
    protected $table = 'front_menus';
    protected $fillable = [
        'sort', 'name', 'path', 'icon', 'parent_id', 'genre', 'status'
    ];
    //子分类
    public function children()
    {
        return $this->hasMany(self::class, 'parent_id', 'id');
    }
}
